package day11.Arrays;

import java.util.Arrays;
import java.util.List;

/**
 * @Auther:小陈的Java
 */
public class ArraysDemo1 {
    public static void main(String[] args) {
        List<Integer> list = Arrays.asList(1,2,3);
        System.out.println(list);
        int[] arr = {1,2,3,9,10,11};
        int index = Arrays.binarySearch(arr,11);
        System.out.println(index);
        int[] arr2 = Arrays.copyOf(arr,arr.length-1);
        System.out.println(Arrays.toString(arr2));
        int[] arr3 = Arrays.copyOfRange(arr,0,2);
        System.out.println(Arrays.toString(arr3));
        int[] arr4 = {1,9,2,7,11};
        Arrays.sort(arr4);
        System.out.println(Arrays.toString(arr4));
        Arrays.fill(arr4,1);
        System.out.println(Arrays.toString(arr4));
    }
}
